package com.org.utils.bean;

import java.math.BigDecimal;
import java.util.Map;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.converters.BigDecimalConverter;
import org.apache.commons.beanutils.converters.SqlDateConverter;

/**
 * 
 */
public class JBeanUtils extends BeanUtils
{

	public static void convert(Object bean, Map map) throws Throwable
	{
		ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
		ConvertUtils.register(new SqlDateConverter(null), java.util.Date.class);
		populate(bean, map);
	}
}
